-- This one has several bad solutions and a couple easy/elegant ones. This is somewhere in between

turtle.forward()

function ironBlock()
    turtle.turnRight()
    turtle.forward()
    turtle.turnLeft()
    turtle.forward()
    turtle.forward()
end

function goldBlock()
    turtle.turnLeft()
    turtle.forward()
    turtle.turnRight()
    turtle.forward()
    turtle.forward()

end

-- This loop can be run either 20 or so times, or if the player is clever they can observe for green concrete
while turtle.inspectDown().name ~= "minecraft:green_concrete" do
    block = turtle.inspect().name
    if block == "minecraft:iron_block" then
        ironBlock()
    elseif block == "minecraft:gold_block" then
        goldBlock()
    end
end
